package com.dragon.modules.yuegou.query.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.act.GiftGoodsRefEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 送礼物品关联表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2021-05-11 17:32:50
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class GiftGoodsRefQuery extends GiftGoodsRefEntity implements Query<GiftGoodsRefEntity> {

	/** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

	/** 排序查询条件 */
	@JsonUnwrapped(prefix = "sortNo")
	private Condition<Integer> sortNoCondition;

	/** 送礼表id查询条件 */
	@JsonUnwrapped(prefix = "giftId")
	private Condition<String> giftIdCondition;

	/** 活动物品id查询条件 */
	@JsonUnwrapped(prefix = "articleId")
	private Condition<String> articleIdCondition;

	/** 活动商品名称查询条件 */
	@JsonUnwrapped(prefix = "commodityName")
	private Condition<String> commodityNameCondition;

	/** 活动积分查询条件 */
	@JsonUnwrapped(prefix = "articlePoints")
	private Condition<Integer> articlePointsCondition;

	/** 数量查询条件 */
	@JsonUnwrapped(prefix = "quantity")
	private Condition<Integer> quantityCondition;

	/** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

	/** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

	/** 删除人ID查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

	/** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public GiftGoodsRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public GiftGoodsRefQuery(GiftGoodsRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public GiftGoodsRefQuery(GiftGoodsRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.sortNoCondition != null) {
			this.sortNoCondition = other.sortNoCondition.copy();
		}
		if(other.giftIdCondition != null) {
			this.giftIdCondition = other.giftIdCondition.copy();
		}
		if(other.articleIdCondition != null) {
			this.articleIdCondition = other.articleIdCondition.copy();
		}
		if(other.commodityNameCondition != null) {
			this.commodityNameCondition = other.commodityNameCondition.copy();
		}
		if(other.articlePointsCondition != null) {
			this.articlePointsCondition = other.articlePointsCondition.copy();
		}
		if(other.quantityCondition != null) {
			this.quantityCondition = other.quantityCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<GiftGoodsRefEntity> toQueryWrapper() {
		QueryWrapper<GiftGoodsRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (sortNoCondition != null) {
			sortNoCondition.toWrapper(wrapper, COL_SORT_NO);
		}
		if (giftIdCondition != null) {
			giftIdCondition.toWrapper(wrapper, COL_GIFT_ID);
		}
		if (articleIdCondition != null) {
			articleIdCondition.toWrapper(wrapper, COL_ARTICLE_ID);
		}
		if (commodityNameCondition != null) {
			commodityNameCondition.toWrapper(wrapper, COL_COMMODITY_NAME);
		}
		if (articlePointsCondition != null) {
			articlePointsCondition.toWrapper(wrapper, COL_ARTICLE_POINTS);
		}
		if (quantityCondition != null) {
			quantityCondition.toWrapper(wrapper, COL_QUANTITY);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}

	/**
	 * 获取查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 *
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回排序查询条件
	 *
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> sortNo() {
		this.sortNoCondition = new Condition<>();
		return this.sortNoCondition;
	}

	/**
	 * 获取排序查询条件
	 *
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> getSortNoCondition() {
		return sortNoCondition;
	}

	/**
	 * 设置排序查询条件
	 *
	 * @param sortNoCondition 排序查询条件
	 */
	public void setSortNoCondition(Condition<Integer> sortNoCondition) {
		this.sortNoCondition = sortNoCondition;
	}

	/**
	 * 构造并返回送礼表id查询条件
	 *
	 * @return giftIdCondition 送礼表id查询条件
	 */
	public Condition<String> giftId() {
		this.giftIdCondition = new Condition<>();
		return this.giftIdCondition;
	}

	/**
	 * 获取送礼表id查询条件
	 *
	 * @return giftIdCondition 送礼表id查询条件
	 */
	public Condition<String> getGiftIdCondition() {
		return giftIdCondition;
	}

	/**
	 * 设置送礼表id查询条件
	 *
	 * @param giftIdCondition 送礼表id查询条件
	 */
	public void setGiftIdCondition(Condition<String> giftIdCondition) {
		this.giftIdCondition = giftIdCondition;
	}

	/**
	 * 构造并返回活动物品id查询条件
	 *
	 * @return articleIdCondition 活动物品id查询条件
	 */
	public Condition<String> articleId() {
		this.articleIdCondition = new Condition<>();
		return this.articleIdCondition;
	}

	/**
	 * 获取活动物品id查询条件
	 *
	 * @return articleIdCondition 活动物品id查询条件
	 */
	public Condition<String> getArticleIdCondition() {
		return articleIdCondition;
	}

	/**
	 * 设置活动物品id查询条件
	 *
	 * @param articleIdCondition 活动物品id查询条件
	 */
	public void setArticleIdCondition(Condition<String> articleIdCondition) {
		this.articleIdCondition = articleIdCondition;
	}

	/**
	 * 构造并返回活动商品名称查询条件
	 *
	 * @return commodityNameCondition 活动商品名称查询条件
	 */
	public Condition<String> commodityName() {
		this.commodityNameCondition = new Condition<>();
		return this.commodityNameCondition;
	}

	/**
	 * 获取活动商品名称查询条件
	 *
	 * @return commodityNameCondition 活动商品名称查询条件
	 */
	public Condition<String> getCommodityNameCondition() {
		return commodityNameCondition;
	}

	/**
	 * 设置活动商品名称查询条件
	 *
	 * @param commodityNameCondition 活动商品名称查询条件
	 */
	public void setCommodityNameCondition(Condition<String> commodityNameCondition) {
		this.commodityNameCondition = commodityNameCondition;
	}

	/**
	 * 构造并返回活动积分查询条件
	 *
	 * @return articlePointsCondition 活动积分查询条件
	 */
	public Condition<Integer> articlePoints() {
		this.articlePointsCondition = new Condition<>();
		return this.articlePointsCondition;
	}

	/**
	 * 获取活动积分查询条件
	 *
	 * @return articlePointsCondition 活动积分查询条件
	 */
	public Condition<Integer> getArticlePointsCondition() {
		return articlePointsCondition;
	}

	/**
	 * 设置活动积分查询条件
	 *
	 * @param articlePointsCondition 活动积分查询条件
	 */
	public void setArticlePointsCondition(Condition<Integer> articlePointsCondition) {
		this.articlePointsCondition = articlePointsCondition;
	}

	/**
	 * 构造并返回数量查询条件
	 *
	 * @return quantityCondition 数量查询条件
	 */
	public Condition<Integer> quantity() {
		this.quantityCondition = new Condition<>();
		return this.quantityCondition;
	}

	/**
	 * 获取数量查询条件
	 *
	 * @return quantityCondition 数量查询条件
	 */
	public Condition<Integer> getQuantityCondition() {
		return quantityCondition;
	}

	/**
	 * 设置数量查询条件
	 *
	 * @param quantityCondition 数量查询条件
	 */
	public void setQuantityCondition(Condition<Integer> quantityCondition) {
		this.quantityCondition = quantityCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 *
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}

	/**
	 * 获取创建人ID查询条件
	 *
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 *
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}

	/**
	 * 获取创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 *
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 *
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}

	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 *
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 *
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人ID查询条件
	 *
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}

	/**
	 * 获取删除人ID查询条件
	 *
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人ID查询条件
	 *
	 * @param delByCondition 删除人ID查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 *
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}

	/**
	 * 获取删除时间查询条件
	 *
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 *
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
